#include "ControlBar.h"
#include "ui_ControlBar.h"
#include <QIntValidator>
ControlBar::ControlBar(QWidget* parent)
	: QWidget(parent)
	, ui(new Ui::ControlBar)
{
	ui->setupUi(this);
	//-ui->lineEdit->setValidator(new QIntValidator(1, 100));
	ui->lineEdit->setValidator(new QIntValidator(1, 3000, ui->lineEdit));
}

ControlBar::~ControlBar()
{
	delete ui;
}

void ControlBar::on_pushButton_clicked()
{
	bool ok = false;
	auto v	= ui->lineEdit->text().toInt(&ok);
	if (ok && v > 0)
	{
		emit signalOk(v);
	}
}
